﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using CCWin;
namespace SCCM
{
    public partial class MusicForm : Skin_Mac
    {
        //private System.Media.SoundPlayer sp;
        private String alertString;
        public MusicForm(DataItem item, char[] flags)
        {
            InitializeComponent();
            //this.sp = sp;
            this.datetime.Text = "在" + item.Datetime;
            this.bdz.Text = item.Bdzbh;
            this.kgs.Text = item.Kgsbh;
            this.kgg.Text = item.Kggbh0;
            this.NO2.Text = item.NO2.ToString();
            this.NO.Text = item.NO.ToString();
            this.CO.Text = item.CO.ToString();
            this.O3.Text = item.O3.ToString();
            CCWin.SkinControl.SkinLabel[] objs = new CCWin.SkinControl.SkinLabel[]{this.NO2,this.CO,this.NO,this.O3};
            for (int i = 0; i < flags.Length; i++) {
                if (flags[i] == '1') {
                    CCWin.SkinControl.SkinLabel target = ((CCWin.SkinControl.SkinLabel)objs[i]);
                    target.Text += "  超标";
                    target.ForeColor = Color.Red;

                }
            }
            
        }

        private void MusicForm_Load(object sender, EventArgs e)
        {
            
        }

        private void skinButton1_Click(object sender, EventArgs e)
        {
            //sp.Stop();
            this.Close();
        }
    }
}
